/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.mapper;

import com.comac.ins.common.mybatis.core.mapper.BaseMapperPlus;
import com.comac.ins.isfd.domain.IsfdSeverManagement;
import com.comac.ins.isfd.domain.bo.query.IsfdServerManagementQueryBo;
import com.comac.ins.isfd.domain.vo.IsfdServerDataExportHistroryVo;
import com.comac.ins.isfd.domain.vo.IsfdServerManagementVo;
import com.comac.ins.isfd.domain.vo.IsfdServerServiceHistroryVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface IsfdServerManagementMapper extends BaseMapperPlus<IsfdSeverManagement, IsfdServerManagementVo> {
    List<IsfdServerManagementVo> queryList(@Param("queryBo") IsfdServerManagementQueryBo queryBo,@Param("pageSize") int pageSize,@Param("offset") int offset);

    Long getTotal(@Param("queryBo") IsfdServerManagementQueryBo queryBo);

    IsfdServerManagementVo selectByUrl(@Param("url") String url);

    void inserImportRecord(@Param("isfdServerServiceHistroryVo") IsfdServerServiceHistroryVo isfdServerServiceHistroryVo);

    void updateCallCount(@Param("id") Long id,@Param("callCount") Long callCount);

    void inserExportRecord(@Param("isfdServerDataExportHistroryVo") IsfdServerDataExportHistroryVo isfdServerDataExportHistroryVo);

    List<IsfdServerServiceHistroryVo> queryServerHistory(@Param("id") Long id,@Param("pageSize") int pageSize,@Param("offset") int offset);

    List<IsfdServerServiceHistroryVo> queryServerHistoryAll(@Param("id") Long id);


    int queryServerHistoryTotal(@Param("id") Long id);

    IsfdServerServiceHistroryVo selectHisById(@Param("id") Long id);

    List<IsfdServerDataExportHistroryVo> selectExportRecordByHistoryId(@Param("id") Long id);

    void publish(@Param("id") Long id);

    void revoke(@Param("id") Long id);

    List<IsfdServerServiceHistroryVo> selectHisByServerId(@Param("serverId") Long serverId);


    Integer getServiceTimesByModelId(@Param("modelId") Long modelId);

    List<IsfdServerServiceHistroryVo> queryServerHistoryByTime(@Param("starTime") String starTime,@Param("endTime") String endTime);

    void deleteData(@Param("id") Long id);

    IsfdSeverManagement selectData(@Param("id") Long id);

    IsfdServerServiceHistroryVo queryServerHistoryByRecordId(@Param("recordId") Long recordId);

}
